package com.ztjy.repository.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ztjy.bean.KcWarehouse;
import com.ztjy.repository.biz.KcWarehouseBiz;
import com.ztjy.repository.dao.KcWarehouseDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KcWarehouseBizImpl implements KcWarehouseBiz {
    @Autowired
    private KcWarehouseDao kdao;

    @Override
    public boolean addKC(KcWarehouse warehouse) {
        boolean flag=false;
        try {
            int row=kdao.addKC(warehouse);
            flag = (row != 0) ? true : false;
        }catch (Exception e){
            e.printStackTrace();
            flag=false;
        }
        return flag;
    }

    @Override
    public boolean updateKCW2(Integer orderDid, Integer num, Integer flag) {
        return kdao.updateKCW2(orderDid, num, flag);
    }

    @Override
    public boolean updateRK(KcWarehouse kcWarehouse,Integer flag) {
        return kdao.updateRK(kcWarehouse,flag);
    }

    @Override
    public boolean delKC(KcWarehouse kcWarehouse) {
        return kdao.delKC(kcWarehouse);
    }

    @Override
    public KcWarehouse findAll(KcWarehouse kcWarehouse) {
        return kdao.findAll(kcWarehouse);
    }
}
